<html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <LINK REL=StyleSheet HREF="transactionPage.css" TYPE="text/css" />
    <style type = "text/css">


     </style>
     <script type="text/javascript">

     function bayar(total,buyerid,details){
        window.location = 'http://<?=$_SERVER['HTTP_HOST'];?>/bitz-plaza/transaction/confirmatrans/buyer_id/'+buyerid
                              +'/details/'+details+'/total/'+total+'/shop_id/2/message/'+
                          'Total pembelian anda Rp.'+total+' Silahkan melakukan pemayaran ke rekening'+
                          'xxxx a.n:wahana untuk melanjutkan transaksi';
     }
     </script>
     </head>

<body>

 <div class="one">

		<div class="margin">
				<center>
					<table class="menuAwal">
						<tr>




							<th> <b style="font-size:70; margin-top:100;">DUMMY WEB </b></th>



						</tr>
					</table>
				</center>
		</div>
</div>


<div class="containerPage">
  

          <div>
 
  <?php

  $details="";

  if(isset($_GET["barang1"])){
            $nama1 = $_GET["namabarang1"];
            $barang1 = $_GET["barang1"];
            $totalharga1 = 1000000;
            $details=$details.'-'.$nama1." Rp.".$totalharga1;
            $totalharga += $totalharga1;}
      else {
                $totalharga = $totalharga;
            }
           

            
  if(isset($_GET["barang2"])){
            $nama2 = $_GET["namabarang2"];
            $barang2 = $_GET["barang2"];
            $totalharga2 = 5000000;
            $totalharga += $totalharga2;
            $details=$details.'-'.$nama2." Rp.".$totalharga2;
            }
            else{

                $totalharga = $totalharga;
            }
            
  if(isset($_GET["barang3"])){
            $nama3 = $_GET["namabarang3"];
            $barang3 = $_GET["barang3"];
            $totalharga3 = 3000000;
            $totalharga += $totalharga3;
            $details=$details.'-'.$nama3." Rp.".$totalharga3;
            }
           else{
               $totalharga = $totalharga;
           }
            
 if(isset($_GET["barang4"])){
            $nama4 = $_GET["namabarang4"];
            $barang4 = $_GET["barang4"];
            $totalharga4 = 7000000;
            $totalharga += $totalharga4;
            $details=$details.'-'.$nama4." Rp.".$totalharga4;
            }
            else{
                $totalharga = $totalharga;
            }

if(isset($_GET["buyer_id"])){
        $buyerid= $_GET['buyer_id'];
}
        
  ?>
      

        <div>

              <table>
              <th>Daftar Barang</th>
              <th>Harga Barang</th>
              <tr>
              <td> <br>  </td>
              <td> <br> </td>
              </tr>
              <tr>
              <td style="float:left;"> <?php if(isset($barang1)) echo $nama1; ?> </td>
              <td> <?php if(isset($barang1)) echo $barang1; ?> </td>
              </tr>

              <tr>
              <td style="float:left;"> <?php if(isset($barang2)) echo $nama2; ?> </td>
              <td> <?php if(isset($barang2)) echo $barang2; ?> </td>
              </tr>

              <tr>
              <td style="float:left;"> <?php if(isset($barang3)) echo $nama3; ?> </td>
              <td> <?php if(isset($barang3)) echo $barang3; ?> </td>
              </tr>

              <tr>
              <td style="float:left;"> <?php if(isset($barang4)) echo $nama4; ?> </td>
              <td> <?php if(isset($barang4)) echo $barang4; ?> </td>
              </tr>
              <tr>
              <td> <br>  </td>
              <td> <br> </td>
              </tr>
              <tr>
              <td>  </td>
              <td> </td>
              </tr>
              <tr >
              <td style="float:left;"> Total Belanja : </td>
              <td> Rp <?php echo $totalharga;?>,00 </td>
              </tr>

              <tr>
              
              <td> <br> </td>
              </tr>
              <tr>

              <td></td>


               <td><input type="button" value="Check Out" onClick="bayar('<?=$totalharga;?>','<?=$buyerid;?>','<?=$details;?>');"/></td>
               </tr>
                                                                                                                           
              </table>



        </div>
              
    
          </div>
      </div>


  
      
 
</body>
</html>

